package com.pd.state;

/**
 * Created with IntelliJ IDEA.
 * User: 5
 * Date: 17-2-27
 * Time: 下午2:45
 * To change this template use File | Settings | File Templates.
 */
public class Noon implements State {
    @Override
    public void writeProgram(Work work) {
        if (work.getTime()>=12&&work.getTime()<14){
            System.out.println("卧槽，改吃饭了");
        }else {
            work.setState(new AfterNoon());
            work.dowork();
        }

    }
}
